<include file="public+header">

{script}
{tagself}
<!--
$(document).ready(function() {

	$("#badwords > ul").tabs();
});

//-->
{/tagself}
{/script}

{script}
<!--
function add(){

	Dyhb.AjaxSubmit('badwordAdd','{:G::U('badword/insert')}','',complete);
}
function complete(data,status){

    if(status==1){

        window.setTimeout(function (){window.location.href=URL,20000});
    }
}
function many_add(){

	Dyhb.AjaxSubmit('badwordManyAdd','{:G::U('badword/many_insert')}','',complete);
}
-->
{/script}

   <!-- 标题  -->
   <div class="title"><if condition="empty( $nId )" ><lang>添加过滤词语</lang><else/><lang>编辑过滤词语</lang></if> ( <a href="{:G::U('badword/index')}"><lang>返回过滤词语列表</lang></a> )</div>

  <!-- 正文 -->
  <div id="content" class="content">
      <div id="badwords">
      <ul>
        <li><a href="#tab_addbadword"><span><lang>添加词语过滤</lang></span></a></li>
        <li><a href="#tab_addmanybadword"><span><lang>批量添加</lang></span></a></li>
      </ul>
    </div>

    <form  method="post" id="badwordAdd" name="badwordAdd">
    <div id="tab_addbadword">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="badword_find"><lang>不良词语</lang>:</label></th>
            <td><input type="text" name="badword_find" id="badword_find" class="field" size="40" value=""/>
            <div class="description"><lang>添加不良词语可以避免触及法律</lang></div></td>
          </tr>
          <tr>
            <th valign="top"><label for="badword_replacement"><lang>替换为</lang>:</label></th>
            <td><input type="text" name="badword_replacement" id="badword_replacement" class="field" size="40"  value=""/>
            <div class="description"><lang>需要将不良词语替换的词语</lang></div>
            </td>
          </tr>
      </table>
       <p class="center"><input type="hidden" name="ajax" value="1">
            <input type="button" onclick="add()"  class="button" value=" <lang>添加过滤词语</lang> " />
            <input type="reset" class="button" value="  <lang>重  置</lang>  " />
        </p>
   </div>
   </form>

   <form  method="post" id="badwordManyAdd" name="badwordManyAdd">
    <div id="tab_addmanybadword">
      <table class="form-table full">
          <tr>
            <th valign="top"><label for="badwords"><lang>不良词语</lang>:</label></th>
            <td><textarea name="badwords" id="badwords" rows="6" cols="80" class="field"></textarea>
              <div class="description"><lang>每行一组，不良词语和替换词语之间使用“=”进行分割。
					如果想将某个词语直接替换成 **，只输入词语即可。</lang><br/>
					<strong><lang>例如</lang>：</strong><br/>
					<lang>toobad</lang><br/>
					<lang>badword=good</lang><br/>
             </div>
            </td>
          </tr>
          <tr>
            <th valign="top"><label for="type"><lang>扩展选项</lang>:</label></th>
            <td><input type="radio" name="type" value="2" id="type" class="field" checked="checked" /><lang>当冲突时，跳过原来的词表</lang><br/>
				<input type="radio" name="type" value="1" id="" class="field" /><lang>当冲突时，覆盖原来的词表</lang><br/>
				<input type="radio" name="type" value="0" id="" class="field" /><lang>清空当前词表，后导入新词语</lang>
				<div class="warning">（<lang>清空当前词表不可恢复，建议首先</lang><a href="{:G::U('badword/export')}" target="_blank"><lang>导出词表</lang></a>，<lang>做好备份</lang>）</div>
</td>
          </tr>
      </table>
       <p class="center"><input type="hidden" name="ajax" value="1">
            <input type="button" onclick="many_add()"  class="button" value=" <lang>批量过滤词语</lang> " />
            <input type="reset" class="button" value="  <lang>重  置</lang>  " />
        </p>
   </div>
   </form>


   </div>
   <!-- end content -->

<include file="public+footer">